<template>
  <div class="nav">
    <tab active-color="#FF933C" bar-active-color="#FF933C" :line-width="2" >
      <tab-item @on-item-click="handler(items.id)" v-for="items of catelist" :key="items.id" :selected="catelist.title === items"  > {{items.title}} </tab-item>
    </tab>
  </div>
</template>

<script>
import { Tab, TabItem } from 'vux'
export default {
  name: 'tabList',
  props: {
    catelist: Array
  },
  data () {
    return {
    }
  },
  components: {
    Tab,
    TabItem
  },
  methods: {
    handler (index) {
      console.log(index)
      this.$emit('tabselect', index)
    }
  }
}
</script>

<style lang="" scoped>
</style>
